let newactionid;
new service(`${CONST.TABLE_PREFIX}_action_browse`).invoke(params.copyid,params.copyid).then(result=>{
	if(result.length === 0) return Promise.reject('not found copy application info');
	let info = result[0];
	info.name = params.name;
	return new action(`${CONST.TABLE_PREFIX}_action_insert`).excute(info);	
}).then(result=>{
	return new service(`${CONST.TABLE_PREFIX}_action_browse`).invoke(params.name,params.name);
}).then(result=>{
	newactionid = result[0].id;
	return new service(`${CONST.TABLE_PREFIX}_authorization_copy`).invoke(newactionid,params.copyid);
}).then(result=>{
	ret(null,'复制成功!');
}).catch(err=>{
	if(newactionid) new action(`${CONST.TABLE_PREFIX}_action_delete`).excute({id:newactionid});
	ret(err);
});
